import request from '@/utils/request'

export function getMyApplicationList(listQuery) {
  return request.get('/resource/application/queryMyApplication', { params: listQuery })
}

export function getTodoApplicationList(listQuery) {
  return request.get('/resource/application/queryTodoApplication', { params: listQuery })
}

export function addResourceApplication(applicationHeader,applicationLineList) {
  return request({
    url: '/resource/application/addResourceApplication',
    method: 'post',
    data: {
      applicationHeader,
      applicationLineList
    }
  })
}

export function updateResourceApplication(resourceApplicationHeader) {
  return request.put('/resource/application/updateResourceApplication', resourceApplicationHeader)
}

export function approve(temVar) {
  return request.put('/resource/application/approve', temVar)
}

export function getApplicationLineList(header_id) {
  return request.get('/resource/application/queryApplicationLines', { params: { 'header_id': header_id } })
}

